﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication3.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>    账号: <asp:TextBox ID="TextBox1" runat="server" OnTextChanged="TextBox1_TextChanged"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="账号不能为空" ControlToValidate="TextBox1"></asp:RequiredFieldValidator>
            <br />

           密码：<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="密码不能为空" ControlToValidate="TextBox2"></asp:RequiredFieldValidator>
            
            <br />
           确认密码：<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
            <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="密码不一致" ControlToValidate="TextBox2" ControlToCompare="TextBox3"></asp:CompareValidator>
           
            <br />
           
           年龄：<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox><asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="不能超出范围" ControlToValidate="TextBox4" MaximumValue="100" MinimumValue="0" Type="Integer"></asp:RangeValidator>
            <br />
            出生日期：<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox><asp:RangeValidator ID="RangeValidator2" runat="server" ErrorMessage="不能超出系统之后" ControlToValidate="TextBox5" Type="Date" MaximumValue="2021-06-10" MinimumValue="1921-06-10"></asp:RangeValidator>
            <br />
            毕业日期：<asp:TextBox ID="TextBox6" runat="server"></asp:TextBox><asp:CompareValidator ID="CompareValidator2" runat="server" ErrorMessage="不能早于出生日期" ControlToValidate="TextBox6" ControlToCompare="TextBox5" Operator="GreaterThan"></asp:CompareValidator>
            <br />
            
            邮箱：<asp:TextBox ID="TextBox7" runat="server" CausesValidation="True"></asp:TextBox><asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="输入错误" ControlToValidate="TextBox7" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
             <br />










             <br />
            <asp:Button ID="Button1" runat="server" Text="提交" OnClick="Button1_Click" /><asp:ValidationSummary ID="ValidationSummary1" runat="server" DisplayMode="SingleParagraph" ShowMessageBox="true" />

               <br />

                <asp:Literal ID="Literal1" runat="server"></asp:Literal>



        </div>
    </form>
</body>
</html>
